<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>StellarDrift - 我的瓶子页原型</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

        :root {
            --phone-width: 430px;
            --phone-height: 932px;
            --primary-bg: #0D1B2A;
            --secondary-bg: #1B263B;
            --lighter-bg: #415A77;
            --accent-gold: #FFD700;
            --text-light: #E0E1DD;
            --text-dark: #778DA9;
            --status-blue: #3498db;
            --status-green: #2ecc71;
            --status-grey: #95a5a6;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f2f5;
            font-family: 'Noto Sans SC', sans-serif;
            overflow: hidden;
        }

        .phone-shell {
            width: var(--phone-width);
            height: var(--phone-height);
            background-color: #111;
            border-radius: 50px;
            padding: 12px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 10px #000;
            position: relative;
        }

        .screen {
            width: 100%;
            height: 100%;
            background-color: var(--primary-bg);
            border-radius: 40px;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        /* Mockup Elements */
        .notch {
            position: absolute;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 35px;
            background-color: #111;
            border-radius: 0 0 20px 20px;
            z-index: 100;
        }
        .home-indicator {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 5px;
            background-color: rgba(255, 255, 255, 0.4);
            border-radius: 5px;
            z-index: 100;
        }
        
        /* Main App Page */
        .my-bottles-page {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            color: var(--text-light);
            animation: fade-in 0.5s ease-out;
        }
        @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

        .page-header {
            display: flex;
            align-items: center;
            padding: 20px;
            padding-top: 50px; /* Space for notch */
            flex-shrink: 0;
            border-bottom: 1px solid var(--lighter-bg);
        }
        .back-button {
            font-size: 24px;
            cursor: pointer;
            color: var(--text-light);
            text-decoration: none;
            margin-right: 20px;
        }
        .header-title {
            font-size: 18px;
            font-weight: 500;
        }
        
        .segmented-control {
            display: flex;
            justify-content: center;
            padding: 15px;
            flex-shrink: 0;
        }
        .segment {
            padding: 8px 20px;
            cursor: pointer;
            color: var(--text-dark);
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }
        .segment.active {
            color: var(--accent-gold);
            border-bottom-color: var(--accent-gold);
        }

        .bottle-list-container {
            flex: 1;
            overflow-y: auto;
            padding: 0 20px;
        }
        .bottle-list-container::-webkit-scrollbar { width: 4px; }
        .bottle-list-container::-webkit-scrollbar-track { background: transparent; }
        .bottle-list-container::-webkit-scrollbar-thumb { background: var(--text-dark); border-radius: 4px; }
        
        .bottle-list {
            display: none;
        }
        .bottle-list.active {
            display: block;
        }

        .bottle-item {
            display: flex;
            align-items: center;
            background-color: rgba(65, 90, 119, 0.5);
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 15px;
            cursor: pointer;
        }
        .bottle-icon {
            font-size: 24px;
            margin-right: 15px;
        }
        .bottle-info {
            flex: 1;
        }
        .bottle-content {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 250px;
        }
        .bottle-meta {
            font-size: 12px;
            color: var(--text-dark);
            margin-top: 8px;
        }
        .bottle-status {
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
        }
        .status-floating { background-color: var(--status-blue); color: white; }
        .status-opened { background-color: var(--status-green); color: white; }
        .status-lost { background-color: var(--status-grey); color: white; }
        .status-collected { background-color: var(--accent-gold); color: var(--primary-bg); }

    </style>
</head>
<body>

    <div class="phone-shell">
        <div class="screen">
            <div class="notch"></div>
            
            <div class="my-bottles-page">
                <header class="page-header">
                    <a href="HomePage.html" class="back-button">‹</a>
                    <h1 class="header-title">我的瓶子</h1>
                </header>

                <nav class="segmented-control" id="segmentedControl">
                    <div class="segment active" data-target="sent">我投递的</div>
                    <div class="segment" data-target="received">我收到的</div>
                    <div class="segment" data-target="collected">我的收藏</div>
                </nav>

                <main class="bottle-list-container">
                    <!-- 我投递的 -->
                    <div class="bottle-list active" id="sent">
                        <div class="bottle-item">
                            <span class="bottle-icon">➡️</span>
                            <div class="bottle-info">
                                <p class="bottle-content">给十年后的自己，希望你还记得今天的约定...</p>
                                <p class="bottle-meta">时光瓶 · 2024-05-20</p>
                            </div>
                            <span class="bottle-status status-floating">漂流中</span>
                        </div>
                         <div class="bottle-item">
                            <span class="bottle-icon">➡️</span>
                            <div class="bottle-info">
                                <p class="bottle-content">今天天气很好，但我的心情像乌云...</p>
                                <p class="bottle-meta">公开瓶 · 2024-05-18</p>
                            </div>
                            <span class="bottle-status status-opened">已开启</span>
                        </div>
                        <div class="bottle-item">
                            <span class="bottle-icon">➡️</span>
                            <div class="bottle-info">
                                <p class="bottle-content">一个无人知晓的秘密。</p>
                                <p class="bottle-meta">公开瓶 · 2024-04-10</p>
                            </div>
                            <span class="bottle-status status-lost">已迷失</span>
                        </div>
                    </div>
                    <!-- 我收到的 -->
                    <div class="bottle-list" id="received">
                        <div class="bottle-item">
                            <span class="bottle-icon">⬅️</span>
                            <div class="bottle-info">
                                <p class="bottle-content">你好，未来的过客。愿你今晚也能看到美丽的星空。</p>
                                <p class="bottle-meta">来自 匿名的宇航员 · 2024-05-21</p>
                            </div>
                            <span class="bottle-status status-opened">已开启</span>
                        </div>
                    </div>
                    <!-- 我的收藏 -->
                    <div class="bottle-list" id="collected">
                        <div class="bottle-item">
                            <span class="bottle-icon">⭐️</span>
                            <div class="bottle-info">
                                <p class="bottle-content">你好，未来的过客。愿你今晚也能看到美丽的星空。</p>
                                <p class="bottle-meta">来自 匿名的宇航员 · 2024-05-21</p>
                            </div>
                            <span class="bottle-status status-collected">已收藏</span>
                        </div>
                    </div>
                </main>
            </div>

            <div class="home-indicator"></div>
        </div>
    </div>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const segmentedControl = document.getElementById('segmentedControl');
    const bottleLists = document.querySelectorAll('.bottle-list');

    segmentedControl.addEventListener('click', (event) => {
        const segment = event.target.closest('.segment');
        if (!segment) return;
        
        // Update active segment
        segmentedControl.querySelector('.active').classList.remove('active');
        segment.classList.add('active');

        // Update active list
        const targetId = segment.dataset.target;
        bottleLists.forEach(list => {
            list.classList.remove('active');
            if (list.id === targetId) {
                list.classList.add('active');
            }
        });
    });
});
</script>

</body>
</html> 